package com.itdachang.design.behavioral.state;


/**
 * 什么场景用到？
 * 状态模式核心需要具体状态类能在必要的时候切换状态
 * 流程框架与状态机
 *
 * 传入一个状态，下一个状态执行的什么 有内部做决定
 * @author gcq
 * @Create 2022-02-13
 */
public class MainTest {
    public static void main(String[] args) {
        TeamState teamState = new VocationState();
        SKTTeam sktTeam = new SKTTeam();

//        sktTeam.startGame();
//        sktTeam.next();
//
//        sktTeam.startGame();
//        sktTeam.next();
//
//        sktTeam.startGame();
//        sktTeam.next();
        teamState = teamState.next();
        sktTeam.setTeamState(teamState);
        sktTeam.startGame();

        teamState = teamState.next();
        sktTeam.setTeamState(teamState);
        sktTeam.startGame();

        teamState = teamState.next();
        sktTeam.setTeamState(teamState);
        sktTeam.startGame();
    }
}